package com.zzyk.main.service;


import com.zzyk.main.configuration.exception.UserException;
import com.zzyk.main.model.pojo.SysUser;
import com.zzyk.main.model.vo.UserInfo;
import com.zzyk.main.model.vo.WxUser;

import java.util.List;

public interface ISysUserService {

    public SysUser login(String username);

    public UserInfo apiLogin(String username, String password) throws UserException;

    public UserInfo apiLogin(SysUser sysUser) throws UserException;

    public UserInfo apiLogin(String openId) throws UserException;

    public UserInfo getUser(int userId);

    public UserInfo getUser(String username);

    public UserInfo getUserWithRole(int userId);

    public UserInfo getUserWithRole(String username);

    public SysUser getUserWithRoleAndPermission(String username);

    public List<UserInfo> getUserList(UserInfo userInfo, int type);

    public List<UserInfo> getUserByOrganizationId(int organizationId);

    public int addUser(SysUser sysUser) throws UserException;

    public void checkPassword(String username, String password) throws UserException;

    public int updateUser(SysUser sysUser);

    public int deleteUser(int userId);

    List<UserInfo> getUserByOrganizationType(int orgType);

    public WxUser getWxUserByOpenId(String openId);

    public WxUser getWxUserByUserId(Integer userId);

    public int addWxUser(WxUser wxUser);

    public int delWxUser(int id);

    public int delWxUserByOpenId(String openId);

    void newUser(SysUser sysUser) throws UserException;

    /**
     * 扫描到期的用户信息
     */
    Integer processingUserInformation(String[] area);

    List<UserInfo> getUserByAreas(String[] area);

    SysUser getUserDetails( String userName);
}
